﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.WMS.Common.ValidateRules
{  
        
    public class GreaterAttribute : BaseAbstractAttribute
    {
        public GreaterAttribute(string? meesage) : base(meesage)
        {

        }


        public override (bool, string?) DoValidate(object? value)
        {

            if (int.TryParse(value?.ToString(), out int count))
            {
                if (count > 0)
                {
                    return (true, string.Empty);
                }
            }

            return (false, Message);
        }


    }
}
